(* Content-type: application/vnd.wolfram.mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 8.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       157,          7]
NotebookDataLength[     77906,       1896]
NotebookOptionsPosition[     72052,       1701]
NotebookOutlinePosition[     72395,       1716]
CellTagsIndexPosition[     72352,       1713]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{

Cell[CellGroupData[{
Cell["Volume 2", "Section",
 CellChangeTimes->{
  3.5353721004569864`*^9, {3.5353722238417835`*^9, 3.5353722289626513`*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"domain", "=", "\"\<Pneumatic\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"displayName", "=", "\"\<Volume2\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"brief", "=", "\"\<Pneumatic volume\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"componentType", "=", "\"\<ComponentC\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"author", "=", "\"\<Petter Krus <petter.krus@liu.se>\>\""}], 
  ";"}], "\n", 
 RowBox[{
  RowBox[{
  "affiliation", " ", "=", " ", 
   "\"\<Division of Fluid and Mechatronic Systems, Link\[ODoubleDot]ping \
University\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SetFilenames", "[", 
   RowBox[{"defaultPath", ",", "domain", ",", "displayName"}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ResetComponentVariables", "[", "]"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{"Date", "[", "]"}]}], "Input",
 CellChangeTimes->{{3.53537005401182*^9, 3.5353700749665146`*^9}, 
   3.5757768067385716`*^9, 3.6058649233092823`*^9}],

Cell[BoxData[
 RowBox[{"ka", "=."}]], "Input",
 CellChangeTimes->{{3.5685222861784153`*^9, 3.568522287312415*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"outputVariables", "  ", "=", " ", 
   RowBox[{"{", 
    RowBox[{"{", 
     RowBox[{
     "mass", ",", "0.001", ",", "double", ",", "\"\<kg\>\"", ",", 
      "\"\<Mass in volume\>\""}], "}"}], "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.535370104846068*^9, 3.535370110494318*^9}, {
  3.535370314418211*^9, 3.5353703208038054`*^9}, {3.535458829959422*^9, 
  3.535458830287555*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"inputParameters", " ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "V", ",", "0.001", ",", "double", ",", "\"\<m3\>\"", ",", 
       "\"\<Volume\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "R", ",", "287.", ",", "double", ",", "\"\<J/Kg K\>\"", ",", 
       "\"\<Gas constant\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "cv", ",", "718.", ",", "double", ",", "\"\<J/Kg K\>\"", ",", 
       "\"\<heatcoeff\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "ka", ",", "0.", ",", "double", ",", "\"\<J/Ks\>\"", ",", 
       "\"\<heat conductance\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "T0", ",", "300.", ",", "double", ",", "\"\<K\>\"", ",", 
       "\"\<Outside temperature\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "alpha", ",", "0.1", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<numerical damping\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "pmin", ",", "1.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<numerical min pressure\>\""}], "}"}]}], "\n", "\t\t", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.5353703270176597`*^9, 3.535370334183889*^9}, {
  3.568449074163356*^9, 3.568449076163355*^9}, {3.568451365855424*^9, 
  3.5684513868785257`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"portConnections", "=", 
   RowBox[{"{", "\[IndentingNewLine]", "\t", 
    RowBox[{
     RowBox[{"PneumaticCport", "[", 
      RowBox[{"p1", ",", "100000.", ",", "\"\<fluid port 1\>\"", ",", 
       RowBox[{"{", 
        RowBox[{"0", ",", "0.5", ",", "270"}], "}"}]}], "]"}], ",", 
     "\[IndentingNewLine]", "\t", 
     RowBox[{"PneumaticCport", "[", 
      RowBox[{"p2", ",", "100000.", ",", "\"\<fluid port 2\>\"", ",", 
       RowBox[{"{", 
        RowBox[{"0", ",", "0.5", ",", "90"}], "}"}]}], "]"}]}], "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.4458567530827656`*^9, 3.445856805848053*^9}, {
  3.516293489375*^9, 3.516293499125*^9}, {3.535541977*^9, 
  3.535541991625*^9}, {3.535542208609375*^9, 3.5355422090625*^9}, {
  3.535542381671875*^9, 3.535542392828125*^9}, {3.5684503752639694`*^9, 
  3.568450377478191*^9}, {3.5721614844077215`*^9, 3.5721614913734183`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"nodeConnections", "=", 
   RowBox[{"{", "\[IndentingNewLine]", "\t", 
    RowBox[{
     RowBox[{"PneumaticCnode", "[", 
      RowBox[{"p1", ",", "100000.", ",", "\"\<fluid port 1\>\""}], "]"}], ",",
      "\[IndentingNewLine]", "\t", 
     RowBox[{"PneumaticCnode", "[", 
      RowBox[{"p2", ",", "100000.", ",", "\"\<fluid port 2\>\""}], "]"}]}], 
    "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.4458567530827656`*^9, 3.445856805848053*^9}, {
  3.516293489375*^9, 3.516293499125*^9}, {3.535541977*^9, 
  3.535541991625*^9}, {3.535542208609375*^9, 3.5355422090625*^9}, {
  3.535542381671875*^9, 3.535542392828125*^9}, {3.5684503752639694`*^9, 
  3.568450377478191*^9}, {3.5684509832627635`*^9, 3.5684509970240593`*^9}, {
  3.5684511449390593`*^9, 3.568451145238059*^9}, {3.5721614930495863`*^9, 
  3.572161494468728*^9}}],

Cell["\<\
qmp1 = qp1;
qmp2 = qp2;\
\>", "Text",
 CellChangeTimes->{{3.5685212396426315`*^9, 3.56852125718814*^9}, 
   3.5720004641798134`*^9}],

Cell[CellGroupData[{

Cell["Pressure and temperature", "Subsection"],

Cell[CellGroupData[{

Cell["Definition of rules", "Subsubsection"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"Unprotect", "[", "D", "]"}], ";"}], "\n", 
 RowBox[{
  RowBox[{
   RowBox[{"D", "[", 
    RowBox[{
     RowBox[{"x_", "  ", "y_"}], ",", "t_"}], "]"}], ":=", 
   RowBox[{
    RowBox[{
     RowBox[{"D", "[", 
      RowBox[{"x", ",", "t"}], "]"}], "y"}], "+", 
    RowBox[{"x", " ", 
     RowBox[{"D", "[", " ", 
      RowBox[{"y", ",", "t"}], "]"}]}]}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{
   RowBox[{"D", "[", 
    RowBox[{
     RowBox[{"x_", " ", "/", "y_"}], ",", "t_"}], "]"}], ":=", 
   RowBox[{
    RowBox[{
     RowBox[{"D", "[", 
      RowBox[{"x", ",", "t"}], "]"}], "/", "y"}], "-", 
    RowBox[{"x", " ", 
     RowBox[{
      RowBox[{"D", "[", " ", 
       RowBox[{"y", ",", "t"}], "]"}], "/", 
      RowBox[{"y", "^", "2"}]}]}]}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{
   RowBox[{"D", "[", 
    RowBox[{
     RowBox[{"x_", "+", "y_"}], ",", "t_"}], "]"}], ":=", 
   RowBox[{
    RowBox[{"D", "[", 
     RowBox[{"x", ",", "t"}], "]"}], "+", 
    RowBox[{"D", "[", 
     RowBox[{"y", ",", "t"}], "]"}]}]}], ";"}]}], "Input"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"p", "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"dotv", " ", "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"U", "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"H", "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"dotU", "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"T", "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"dotv", "=."}], ";"}], "\n", 
 RowBox[{
  RowBox[{"Tav", "=."}], ";"}]}], "Input"],

Cell[BoxData[
 RowBox[{" ", 
  RowBox[{
   RowBox[{
    RowBox[{
     RowBox[{
      SubscriptBox["\[PartialD]", "t"], " ", "m"}], "=", " ", "qm"}], "  ", 
    ";"}], "\n", 
   RowBox[{
    RowBox[{
     RowBox[{
      SubscriptBox["\[PartialD]", "t"], " ", "p"}], " ", "=", " ", "dotp"}], 
    ";"}], "\n", 
   RowBox[{
    RowBox[{
     RowBox[{
      SubscriptBox["\[PartialD]", "t"], " ", "v"}], " ", "=", " ", "dotv"}], 
    ";"}], "\n", 
   RowBox[{
    RowBox[{
     RowBox[{
      SubscriptBox["\[PartialD]", "t"], " ", "T"}], " ", "=", " ", "dotT"}], 
    ";"}], "\n", 
   RowBox[{
    RowBox[{
     RowBox[{
      SubscriptBox["\[PartialD]", "t"], " ", "U"}], "=", " ", "dotU"}], ";"}],
    "\n", 
   RowBox[{
    RowBox[{
     RowBox[{
      SubscriptBox["\[PartialD]", "t"], " ", "H"}], "=", " ", "dotH"}], 
    ";"}]}]}]], "Input"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["Equations", "Subsection"],

Cell[BoxData[
 RowBox[{
  RowBox[{"eqp", " ", "=", " ", 
   RowBox[{"p", " ", "==", " ", 
    FractionBox[
     RowBox[{"mass", " ", "R", " ", "T"}], "V"]}]}], ";"}]], "Input",
 CellChangeTimes->{3.535458850131813*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"eqU", " ", "=", " ", 
   RowBox[{"U", " ", "==", " ", 
    RowBox[{"mass", " ", "cv", " ", "T"}]}]}], ";"}]], "Input",
 CellChangeTimes->{3.535458851741229*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"eqH", " ", "=", " ", 
   RowBox[{"H", " ", "==", " ", 
    RowBox[{"U", " ", "+", "  ", 
     RowBox[{"p", " ", "V"}]}]}]}], ";"}]], "Input"],

Cell[BoxData[
 FormBox[
  RowBox[{"H", "=", 
   RowBox[{"m", " ", "T", 
    RowBox[{"(", 
     RowBox[{
      SubscriptBox["c", "v"], " ", "+", " ", "R"}], ")"}]}]}], 
  TextForm]], "DisplayFormula"],

Cell[CellGroupData[{

Cell[BoxData["T"], "Input",
 CellChangeTimes->{3.535376178078125*^9}],

Cell[BoxData["T"], "Output",
 CellChangeTimes->{
  3.53537617896875*^9, 3.53537643790625*^9, 3.535396337234375*^9, 
   3.5353963794375*^9, 3.5353964519375*^9, 3.535455425624792*^9, 
   3.5354581235875845`*^9, 3.535458228601923*^9, 3.535458912726676*^9, 
   3.53552598378125*^9, 3.5355263970625*^9, 3.53552646228125*^9, 
   3.535526583453125*^9, 3.535526702921875*^9, 3.5355411041875*^9, 
   3.568446773642931*^9, 3.568449494431532*^9, 3.5684505247469163`*^9, 
   3.5684505798214235`*^9, 3.5684506840878487`*^9, 3.568451031075059*^9, 
   3.568451061855059*^9, 3.568451202913059*^9, 3.568454858262644*^9, 
   3.568456820307838*^9, 3.5684574515738363`*^9, 3.568458839806777*^9, 
   3.5684589726270576`*^9, 3.5684590543882327`*^9, 3.5685213297233353`*^9, 
   3.5685221871174154`*^9, 3.5685223070394154`*^9, 3.571999395706291*^9, 
   3.5720003683651104`*^9, 3.5720004980476303`*^9, 3.572000552629672*^9, 
   3.5720038989114203`*^9, 3.5720050603895273`*^9, 3.5720086344513865`*^9, 
   3.5720092453474703`*^9, 3.5721611688981743`*^9, 3.5721614588511667`*^9, 
   3.5721616721834974`*^9, 3.572167675321789*^9, 3.5721679960798616`*^9, 
   3.5721737443466496`*^9, 3.572174176445855*^9, {3.575776912721765*^9, 
   3.5757769354839153`*^9}, {3.575777021552255*^9, 3.5757770288898478`*^9}, 
   3.5757998706818995`*^9, 3.5774506219592457`*^9, 3.57745065781083*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"eqT", " ", "=", " ", 
  RowBox[{"T", "==", " ", 
   FractionBox[
    RowBox[{"U", " ", "+", "  ", 
     RowBox[{"p", " ", "V"}]}], 
    RowBox[{"mass", 
     RowBox[{"(", 
      RowBox[{"cv", " ", "+", " ", "R"}], ")"}]}]]}]}]], "Input",
 CellChangeTimes->{3.535458858491402*^9}],

Cell[BoxData[
 RowBox[{"T", "\[Equal]", 
  FractionBox[
   RowBox[{"U", "+", 
    RowBox[{"p", " ", "V"}]}], 
   RowBox[{"mass", " ", 
    RowBox[{"(", 
     RowBox[{"cv", "+", "R"}], ")"}]}]]}]], "Output",
 CellChangeTimes->{
  3.4458594457448225`*^9, 3.44586008367824*^9, {3.445860217271135*^9, 
   3.4458602246460876`*^9}, 3.4458613129516225`*^9, 3.445861579059294*^9, 
   3.535372461760236*^9, 3.535376183203125*^9, 3.535376438015625*^9, 
   3.53539633784375*^9, 3.5353963795*^9, 3.535396452*^9, 3.535455425656041*^9,
    3.5354581236032095`*^9, 3.535458228617548*^9, 3.535458912742301*^9, 
   3.535525983859375*^9, 3.535526397171875*^9, 3.535526462375*^9, 
   3.535526583546875*^9, 3.535526703046875*^9, 3.53554110428125*^9, 
   3.568446773725931*^9, 3.568449494484543*^9, 3.5684505247799196`*^9, 
   3.568450579858427*^9, 3.5684506841258526`*^9, 3.5684510311090593`*^9, 
   3.5684510618970594`*^9, 3.568451202948059*^9, 3.568454858308648*^9, 
   3.568456820440851*^9, 3.568457451616836*^9, 3.568458839847781*^9, 
   3.568458972663061*^9, 3.5684590544242363`*^9, 3.5685213297473383`*^9, 
   3.5685221871454153`*^9, 3.568522307083415*^9, 3.571999395737494*^9, 
   3.5720003683963103`*^9, 3.5720004980788307`*^9, 3.572000552660872*^9, 
   3.57200389892702*^9, 3.5720050604207277`*^9, 3.5720086344823895`*^9, 
   3.5720092453834734`*^9, 3.5721611689241767`*^9, 3.5721614588761687`*^9, 
   3.5721616722145004`*^9, 3.5721676753487916`*^9, 3.572167996105864*^9, 
   3.5721737443746524`*^9, 3.5721741764688573`*^9, {3.5757769127373767`*^9, 
   3.575776935499527*^9}, {3.575777021583479*^9, 3.57577702890546*^9}, 
   3.5757998707099*^9, 3.5774506220182514`*^9, 3.577450657834833*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"eqdotp", " ", "=", 
  RowBox[{
   RowBox[{"D", "[", 
    RowBox[{
     RowBox[{"eqp", "[", 
      RowBox[{"[", "1", "]"}], "]"}], ",", "t"}], "]"}], "==", 
   RowBox[{"D", "[", 
    RowBox[{
     RowBox[{"eqp", "[", 
      RowBox[{"[", "2", "]"}], "]"}], ",", "t"}], "]"}]}]}]], "Input"],

Cell[BoxData[
 RowBox[{"dotp", "\[Equal]", 
  FractionBox[
   RowBox[{"dotT", " ", "mass", " ", "R"}], "V"]}]], "Output",
 CellChangeTimes->{
  3.445859445807322*^9, 3.445860083756364*^9, {3.4458602173492594`*^9, 
   3.4458602247398367`*^9}, 3.445861313014122*^9, 3.4458615791061687`*^9, 
   3.535372462181816*^9, 3.535376191640625*^9, 3.535376438109375*^9, 
   3.53539633828125*^9, 3.535396379546875*^9, 3.535396452078125*^9, 
   3.5354554256716657`*^9, 3.5354581236188345`*^9, 3.5354582286331725`*^9, 
   3.535458912773551*^9, 3.5355259839375*^9, 3.535526397265625*^9, 
   3.53552646246875*^9, 3.535526583640625*^9, 3.53552670375*^9, 
   3.53554110440625*^9, 3.568446773755931*^9, 3.568449494533552*^9, 
   3.568450524813923*^9, 3.568450579896431*^9, 3.5684506841708574`*^9, 
   3.568451031137059*^9, 3.5684510619320593`*^9, 3.5684512029850593`*^9, 
   3.5684548583816557`*^9, 3.5684568204858556`*^9, 3.568457451662836*^9, 
   3.5684588398917856`*^9, 3.568458972703065*^9, 3.5684590544562397`*^9, 
   3.568521329799343*^9, 3.5685221871784153`*^9, 3.5685223071104155`*^9, 
   3.571999395768697*^9, 3.57200036841191*^9, 3.572000498110031*^9, 
   3.5720005526920724`*^9, 3.5720038989582205`*^9, 3.572005060436328*^9, 
   3.5720086345203934`*^9, 3.572009245416477*^9, 3.57216116896218*^9, 
   3.5721614589011717`*^9, 3.5721616722355027`*^9, 3.572167675372794*^9, 
   3.5721679961318665`*^9, 3.572173744402655*^9, 3.5721741764918594`*^9, {
   3.575776912752989*^9, 3.575776935515139*^9}, {3.5757770215990906`*^9, 
   3.575777028921072*^9}, 3.5757998707398996`*^9, 3.5774506220592556`*^9, 
   3.577450657859835*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"eqdotS", " ", "=", " ", 
  RowBox[{"dotU", " ", "==", " ", 
   RowBox[{
    RowBox[{"dotSq", " ", "T"}], " ", "+", " ", 
    RowBox[{"dotSew", " ", "T"}]}]}]}]], "Input"],

Cell[BoxData[
 RowBox[{"dotU", "\[Equal]", 
  RowBox[{
   RowBox[{"dotSew", " ", "T"}], "+", 
   RowBox[{"dotSq", " ", "T"}]}]}]], "Output",
 CellChangeTimes->{
  3.4458594458854465`*^9, 3.445860083834489*^9, {3.445860217411759*^9, 
   3.4458602248179617`*^9}, 3.4458613130609965`*^9, 3.4458615791686687`*^9, 
   3.5353724622442727`*^9, 3.535376200390625*^9, 3.53537644465625*^9, 
   3.535396338390625*^9, 3.535396379609375*^9, 3.535396452140625*^9, 
   3.53545542568729*^9, 3.5354581236500845`*^9, 3.535458228648797*^9, 
   3.5354589127891755`*^9, 3.535525984015625*^9, 3.535526397921875*^9, 
   3.535526463125*^9, 3.53552658425*^9, 3.535526703890625*^9, 
   3.535541105140625*^9, 3.568446773812931*^9, 3.568449494581562*^9, 
   3.568450524849927*^9, 3.5684505799334345`*^9, 3.568450684210861*^9, 
   3.568451031177059*^9, 3.5684510619630594`*^9, 3.568451203013059*^9, 
   3.568454858413659*^9, 3.568456820544862*^9, 3.568457451703836*^9, 
   3.5684588399487915`*^9, 3.5684589727450695`*^9, 3.568459054490243*^9, 
   3.5685213298233457`*^9, 3.568522187203415*^9, 3.568522307153415*^9, 
   3.571999395784298*^9, 3.5720003684431105`*^9, 3.5720004981412306`*^9, 
   3.5720005527232723`*^9, 3.5720038989738207`*^9, 3.5720050604675283`*^9, 
   3.572008634564398*^9, 3.57200924544848*^9, 3.5721611689871826`*^9, 
   3.572161458928174*^9, 3.5721616722535048`*^9, 3.572167675396796*^9, 
   3.5721679961578693`*^9, 3.572173744431658*^9, 3.572174176514862*^9, {
   3.5757769127842126`*^9, 3.575776935546363*^9}, {3.575777021630315*^9, 
   3.5757770289522953`*^9}, 3.5757998707709*^9, 3.577450622111261*^9, 
   3.577450657885838*^9}]
}, Open  ]],

Cell[BoxData[{
 RowBox[{
  RowBox[{"dotUq", " ", "=", "   ", 
   RowBox[{"qm", " ", "cv", " ", "Tin"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"DotUew", " ", "=", " ", 
   RowBox[{"p", " ", "qv"}]}], ";"}]}], "Input"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"eqdotU", " ", "=", " ", 
  RowBox[{"dotE", " ", "==", " ", 
   RowBox[{"dotUq", " ", "+", " ", "dotUew"}]}]}]], "Input"],

Cell[BoxData[
 RowBox[{"dotE", "\[Equal]", 
  RowBox[{"dotUew", "+", 
   RowBox[{"cv", " ", "qm", " ", "Tin"}]}]}]], "Output",
 CellChangeTimes->{
  3.4458594460573206`*^9, 3.445860083928238*^9, {3.4458602175055084`*^9, 
   3.4458602249117107`*^9}, 3.445861313139121*^9, 3.445861579231168*^9, 
   3.5353724623379574`*^9, 3.535376200890625*^9, 3.535376444828125*^9, 
   3.535396338515625*^9, 3.53539637975*^9, 3.535396452234375*^9, 
   3.5354554257185397`*^9, 3.535458123681334*^9, 3.535458228680047*^9, 
   3.5354589128204255`*^9, 3.53552598446875*^9, 3.5355263980625*^9, 
   3.53552646325*^9, 3.535526584375*^9, 3.53552670403125*^9, 
   3.535541105296875*^9, 3.568446773884931*^9, 3.5684494946335726`*^9, 
   3.5684505248919306`*^9, 3.56845057998944*^9, 3.5684506842548656`*^9, 
   3.568451031231059*^9, 3.568451062028059*^9, 3.5684512030570593`*^9, 
   3.568454858484666*^9, 3.5684568206138687`*^9, 3.568457451775836*^9, 
   3.568458839998796*^9, 3.5684589728170767`*^9, 3.568459054538248*^9, 
   3.56852132986735*^9, 3.568522187267415*^9, 3.5685223071884155`*^9, 
   3.5719993958311024`*^9, 3.572000368489911*^9, 3.572000498188031*^9, 
   3.572000552848073*^9, 3.572003899005021*^9, 3.5720050604987288`*^9, 
   3.5720086346114025`*^9, 3.572009245487484*^9, 3.5721611690231867`*^9, 
   3.5721614589631777`*^9, 3.572161672279507*^9, 3.5721676754318*^9, 
   3.5721679961918726`*^9, 3.5721737444686613`*^9, 3.5721741765468655`*^9, {
   3.5757769128154364`*^9, 3.5757769355619745`*^9}, {3.575777021661538*^9, 
   3.5757770289835196`*^9}, 3.5757998708068995`*^9, 3.577450622160266*^9, 
   3.5774506579188414`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData["dotU"], "Input"],

Cell[BoxData["dotU"], "Output",
 CellChangeTimes->{
  3.445859446135445*^9, 3.445860084006363*^9, {3.4458602175836325`*^9, 
   3.4458602249898353`*^9}, 3.445861313185996*^9, 3.445861579293668*^9, 
   3.535372462400414*^9, 3.53537620096875*^9, 3.535376444921875*^9, 
   3.535396338609375*^9, 3.535396379828125*^9, 3.5353964523125*^9, 
   3.535455425734164*^9, 3.535458123696959*^9, 3.535458228695671*^9, 
   3.5354589128360505`*^9, 3.53552598453125*^9, 3.535526398140625*^9, 
   3.535526463328125*^9, 3.535526584484375*^9, 3.535526704125*^9, 
   3.53554110540625*^9, 3.5684467739319315`*^9, 3.568449494681582*^9, 
   3.5684505249249344`*^9, 3.5684505800294437`*^9, 3.5684506843048706`*^9, 
   3.568451031275059*^9, 3.5684510620690594`*^9, 3.568451203086059*^9, 
   3.5684548585196695`*^9, 3.568456820648872*^9, 3.5684574518318357`*^9, 
   3.5684588400508013`*^9, 3.568458972863081*^9, 3.5684590545742517`*^9, 
   3.5685213298913527`*^9, 3.5685221872974153`*^9, 3.568522307246415*^9, 
   3.571999395862305*^9, 3.5720003685211115`*^9, 3.5720004982192316`*^9, 
   3.572000552910474*^9, 3.5720038990362215`*^9, 3.5720050605299287`*^9, 
   3.5720086346424055`*^9, 3.5720092455174875`*^9, 3.572161169048189*^9, 
   3.5721614589871798`*^9, 3.5721616722985086`*^9, 3.5721676754548025`*^9, 
   3.572167996216875*^9, 3.5721737444976645`*^9, 3.5721741765698676`*^9, {
   3.5757769128310485`*^9, 3.5757769355931983`*^9}, {3.5757770216771507`*^9, 
   3.575777028999131*^9}, 3.5757998708438997`*^9, 3.577450622194269*^9, 
   3.5774506579428434`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{" ", 
  RowBox[{"dotU", " ", "=", 
   RowBox[{"dotE", "-", 
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"p", " ", "V"}], ",", "t"}], "]"}]}]}]}]], "Input"],

Cell[BoxData[
 RowBox[{"dotE", "-", 
  RowBox[{"dotp", " ", "V"}]}]], "Output",
 CellChangeTimes->{
  3.4458594461979446`*^9, 3.4458600841782365`*^9, {3.445860217708632*^9, 
   3.44586022506796*^9}, 3.445861313248495*^9, 3.4458615793405423`*^9, 
   3.5353724624628706`*^9, 3.5353762010625*^9, 3.53537644503125*^9, 
   3.535396338703125*^9, 3.5353963799375*^9, 3.535396452375*^9, 
   3.5354554257654133`*^9, 3.535458123712584*^9, 3.535458228726921*^9, 
   3.535458912851675*^9, 3.535525984640625*^9, 3.535526398234375*^9, 
   3.535526463421875*^9, 3.535526584578125*^9, 3.53552670421875*^9, 
   3.535541106140625*^9, 3.568446773989931*^9, 3.5684494947235904`*^9, 
   3.5684505249609375`*^9, 3.5684505800594473`*^9, 3.5684506843348737`*^9, 
   3.5684510313200593`*^9, 3.5684510621030593`*^9, 3.568451203119059*^9, 
   3.5684548585556726`*^9, 3.5684568207148786`*^9, 3.568457451875836*^9, 
   3.5684588400948057`*^9, 3.5684589729070854`*^9, 3.568459054612255*^9, 
   3.5685213299343567`*^9, 3.5685221873554153`*^9, 3.5685223072974153`*^9, 
   3.571999395893508*^9, 3.5720003685523114`*^9, 3.5720004982504315`*^9, 
   3.572000552941674*^9, 3.572003899051821*^9, 3.572005060545529*^9, 
   3.5720086346704082`*^9, 3.57200924554749*^9, 3.5721611690741916`*^9, 
   3.5721614590131826`*^9, 3.572161672316511*^9, 3.572167675481805*^9, 
   3.572167996242878*^9, 3.5721737445266676`*^9, 3.57217417659387*^9, {
   3.57577691284666*^9, 3.5757769356088104`*^9}, {3.575777021708374*^9, 
   3.5757770290303555`*^9}, 3.5757998708698997`*^9, 3.5774506222282724`*^9, 
   3.577450657966846*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"qv", " ", "=", " ", 
  RowBox[{"qm", " ", "R", " ", 
   RowBox[{"Tin", "/", "p"}]}]}]], "Input"],

Cell[BoxData[
 FractionBox[
  RowBox[{"qm", " ", "R", " ", "Tin"}], "p"]], "Output",
 CellChangeTimes->{
  3.445859446260444*^9, 3.445860084256361*^9, {3.4458602177867565`*^9, 
   3.4458602251304593`*^9}, 3.44586131329537*^9, 3.4458615793874173`*^9, 
   3.5353724625253267`*^9, 3.53537620115625*^9, 3.535376445125*^9, 
   3.535396338796875*^9, 3.53539638034375*^9, 3.53539645271875*^9, 
   3.5354554257810383`*^9, 3.5354581237438335`*^9, 3.5354582287425456`*^9, 
   3.535458912882925*^9, 3.53552598471875*^9, 3.535526398328125*^9, 
   3.535526463515625*^9, 3.535526584671875*^9, 3.5355267043125*^9, 
   3.535541106234375*^9, 3.568446774045931*^9, 3.5684494947685995`*^9, 
   3.568450524992941*^9, 3.56845058009245*^9, 3.5684506843808784`*^9, 
   3.5684510313470592`*^9, 3.568451062138059*^9, 3.568451203146059*^9, 
   3.568454858596677*^9, 3.568456820769884*^9, 3.568457451916836*^9, 
   3.5684588401518116`*^9, 3.568458972963091*^9, 3.5684590546422586`*^9, 
   3.5685213299613595`*^9, 3.568522187403415*^9, 3.568522307324415*^9, 
   3.5719993959247108`*^9, 3.5720003685835114`*^9, 3.5720004982816315`*^9, 
   3.5720005529728737`*^9, 3.572003899083021*^9, 3.572005060576729*^9, 
   3.5720086347104125`*^9, 3.572009245578493*^9, 3.572161169100194*^9, 
   3.572161459036185*^9, 3.5721616723345127`*^9, 3.5721676755078077`*^9, 
   3.5721679962698803`*^9, 3.5721737445556707`*^9, 3.5721741766188726`*^9, {
   3.575776912877884*^9, 3.575776935624422*^9}, {3.5757770217395983`*^9, 
   3.575777029045967*^9}, 3.5757998708998995`*^9, 3.577450622263276*^9, 
   3.5774506579918485`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"eqH", "[", 
  RowBox[{"[", "2", "]"}], "]"}]], "Input",
 CellChangeTimes->{{3.535376292203125*^9, 3.535376293234375*^9}}],

Cell[BoxData[
 RowBox[{"U", "+", 
  RowBox[{"p", " ", "V"}]}]], "Output",
 CellChangeTimes->{{3.535376284734375*^9, 3.535376293875*^9}, 
   3.535376451671875*^9, 3.53539633890625*^9, 3.535396380421875*^9, 
   3.5353964528125*^9, 3.5354554257966623`*^9, 3.5354581237594585`*^9, 
   3.53545822875817*^9, 3.53545891289855*^9, 3.535525984796875*^9, 
   3.53552639896875*^9, 3.53552646415625*^9, 3.535526585296875*^9, 
   3.53552670440625*^9, 3.5355411063125*^9, 3.5684467740919313`*^9, 
   3.5684494947936044`*^9, 3.5684505250199437`*^9, 3.568450580127454*^9, 
   3.5684506844348836`*^9, 3.568451031388059*^9, 3.5684510621690593`*^9, 
   3.5684512031760592`*^9, 3.568454858632681*^9, 3.568456820835891*^9, 
   3.568457451959836*^9, 3.568458840196816*^9, 3.568458973002095*^9, 
   3.568459054677262*^9, 3.5685213300023637`*^9, 3.5685221874684153`*^9, 
   3.5685223073814154`*^9, 3.5719993959559135`*^9, 3.5720003686147118`*^9, 
   3.572000498312832*^9, 3.572000553004074*^9, 3.5720038990986214`*^9, 
   3.572005060607929*^9, 3.572008634746416*^9, 3.572009245606496*^9, 
   3.5721611691251965`*^9, 3.572161459059187*^9, 3.5721616723535147`*^9, 
   3.57216767553181*^9, 3.572167996302884*^9, 3.5721737445856733`*^9, 
   3.572174176644875*^9, {3.575776912893496*^9, 3.5757769356556463`*^9}, {
   3.57577702175521*^9, 3.575777029077191*^9}, 3.5757998709248996`*^9, 
   3.5774506222992797`*^9, 3.577450658015851*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"eqdotT", " ", "=", " ", 
  RowBox[{"dotT", " ", "==", 
   RowBox[{"D", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"eqH", "[", 
       RowBox[{"[", "2", "]"}], "]"}], "/", 
      RowBox[{"(", 
       RowBox[{"mass", " ", 
        RowBox[{"(", 
         RowBox[{"cv", "+", "R"}], ")"}]}], ")"}]}], ",", "t"}], 
    "]"}]}]}]], "Input",
 CellChangeTimes->{3.5354588608508377`*^9}],

Cell[BoxData[
 RowBox[{"dotT", "\[Equal]", 
  FractionBox["dotE", 
   RowBox[{"mass", " ", 
    RowBox[{"(", 
     RowBox[{"cv", "+", "R"}], ")"}]}]]}]], "Output",
 CellChangeTimes->{
  3.4458594463385687`*^9, 3.44586008435011*^9, {3.4458602178648806`*^9, 
   3.445860225208584*^9}, 3.4458613133734946`*^9, 3.445861579449917*^9, 
   3.535372462619011*^9, 3.535376205578125*^9, 3.535376451765625*^9, 
   3.535396339265625*^9, 3.5353963805*^9, 3.535396452875*^9, 
   3.5354554258122873`*^9, 3.5354581237907085`*^9, 3.5354582287894197`*^9, 
   3.535458912914175*^9, 3.535525984875*^9, 3.5355263990625*^9, 
   3.53552646425*^9, 3.535526585390625*^9, 3.535526704515625*^9, 
   3.53554110640625*^9, 3.5684467741649313`*^9, 3.568449494834613*^9, 
   3.5684505250539474`*^9, 3.5684505801644573`*^9, 3.5684506845028906`*^9, 
   3.568451031436059*^9, 3.568451062204059*^9, 3.568451203205059*^9, 
   3.5684548586746845`*^9, 3.568456820867894*^9, 3.568457452016836*^9, 
   3.5684588402438207`*^9, 3.568458973038099*^9, 3.568459054711265*^9, 
   3.568521330028366*^9, 3.568522187524415*^9, 3.5685223074224153`*^9, 
   3.5719993959871163`*^9, 3.572000368630312*^9, 3.5720004983440323`*^9, 
   3.5720005530352745`*^9, 3.572003899129822*^9, 3.5720050606235294`*^9, 
   3.5720086347794194`*^9, 3.572009245633499*^9, 3.572161169150199*^9, 
   3.5721614590831895`*^9, 3.572161672373516*^9, 3.5721676755568123`*^9, 
   3.5721679963278866`*^9, 3.5721737446146765`*^9, 3.5721741766698775`*^9, {
   3.57577691292472*^9, 3.575776935671258*^9}, {3.5757770217708216`*^9, 
   3.575777029092803*^9}, 3.5757998709518995`*^9, 3.577450622334283*^9, 
   3.5774506580408535`*^9}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["Solving the quations", "Subsection"],

Cell[BoxData[
 RowBox[{
  RowBox[{"dotV", "=."}], ";"}]], "Input"],

Cell["The system of equations", "Text"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"eqdotp", ",", "eqp", ",", "eqU"}], "}"}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"dotp", "\[Equal]", 
    FractionBox[
     RowBox[{"dotT", " ", "mass", " ", "R"}], "V"]}], ",", 
   RowBox[{"p", "\[Equal]", 
    FractionBox[
     RowBox[{"mass", " ", "R", " ", "T"}], "V"]}], ",", 
   RowBox[{"U", "\[Equal]", 
    RowBox[{"cv", " ", "mass", " ", "T"}]}]}], "}"}]], "Output",
 CellChangeTimes->{
  3.445859446416693*^9, 3.445860084428235*^9, {3.4458602019587326`*^9, 
   3.4458602252867084`*^9}, 3.445861313435994*^9, 3.4458615794967914`*^9, 
   3.5353724626970816`*^9, 3.535376326046875*^9, 3.535376458140625*^9, 
   3.535396339390625*^9, 3.53539638059375*^9, 3.53539645296875*^9, 
   3.5354554258435364`*^9, 3.5354581238063335`*^9, 3.535458228805044*^9, 
   3.535458912945425*^9, 3.535525985015625*^9, 3.5355263991875*^9, 
   3.535526464375*^9, 3.535526585515625*^9, 3.535526704640625*^9, 
   3.535541107125*^9, 3.568446774229931*^9, 3.568449494891624*^9, 
   3.5684505250969515`*^9, 3.5684505802234635`*^9, 3.568450684548895*^9, 
   3.5684510314770594`*^9, 3.568451062252059*^9, 3.568451203247059*^9, 
   3.5684548587246895`*^9, 3.5684568211619234`*^9, 3.568457452070836*^9, 
   3.5684588403088274`*^9, 3.568458973090104*^9, 3.568459054750269*^9, 
   3.56852133006837*^9, 3.5685221875664153`*^9, 3.568522307458415*^9, 
   3.571999396018319*^9, 3.572000368677112*^9, 3.5720004983752327`*^9, 
   3.572000553082075*^9, 3.572003899161022*^9, 3.5720050606547294`*^9, 
   3.5720086348184233`*^9, 3.572009245668502*^9, 3.572161169188203*^9, 
   3.572161459114193*^9, 3.572161672398519*^9, 3.5721676755898156`*^9, 
   3.5721679963638897`*^9, 3.57217374465268*^9, 3.5721741767118816`*^9, {
   3.5757769129403315`*^9, 3.5757769357024817`*^9}, {3.5757770218176575`*^9, 
   3.5757770291240263`*^9}, 3.5757998709918995`*^9, 3.577450622389289*^9, 
   3.5774506580838575`*^9}]
}, Open  ]],

Cell["Solving for dotp,dotT,m, and U", "Text"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"eqdotp", ",", "eqp", ",", "eqdotS"}], "}"}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"dotp", "\[Equal]", 
    FractionBox[
     RowBox[{"dotT", " ", "mass", " ", "R"}], "V"]}], ",", 
   RowBox[{"p", "\[Equal]", 
    FractionBox[
     RowBox[{"mass", " ", "R", " ", "T"}], "V"]}], ",", 
   RowBox[{
    RowBox[{"dotE", "-", 
     RowBox[{"dotp", " ", "V"}]}], "\[Equal]", 
    RowBox[{
     RowBox[{"dotSew", " ", "T"}], "+", 
     RowBox[{"dotSq", " ", "T"}]}]}]}], "}"}]], "Output",
 CellChangeTimes->{
  3.4458594464791927`*^9, 3.445860084506359*^9, {3.4458602020524817`*^9, 
   3.445860225364833*^9}, 3.445861313482869*^9, 3.445861579559291*^9, 
   3.535372462759538*^9, 3.535376458265625*^9, 3.535396339484375*^9, 
   3.535396380671875*^9, 3.535396453046875*^9, 3.535455425859161*^9, 
   3.5354581238375835`*^9, 3.535458228820669*^9, 3.5354589129610496`*^9, 
   3.535525985078125*^9, 3.53552639928125*^9, 3.535526464453125*^9, 
   3.535526585609375*^9, 3.535526704734375*^9, 3.535541107203125*^9, 
   3.568446774491931*^9, 3.568449494936633*^9, 3.5684505251369553`*^9, 
   3.568450580268468*^9, 3.568450684579898*^9, 3.5684510315220594`*^9, 
   3.568451062297059*^9, 3.568451203282059*^9, 3.5684548587626934`*^9, 
   3.5684568212079277`*^9, 3.568457452115836*^9, 3.5684588403618326`*^9, 
   3.5684589731351085`*^9, 3.568459054798274*^9, 3.5685213300943727`*^9, 
   3.568522187611415*^9, 3.568522307515415*^9, 3.571999396049522*^9, 
   3.5720003686927123`*^9, 3.5720004984064326`*^9, 3.572000553113275*^9, 
   3.572003899176622*^9, 3.5720050606859293`*^9, 3.5720086348494263`*^9, 
   3.572009245695505*^9, 3.5721611692152057`*^9, 3.572161459137195*^9, 
   3.572161672416521*^9, 3.572167675613818*^9, 3.572167996391893*^9, 
   3.572173744681683*^9, 3.5721741767388844`*^9, {3.5757769129715557`*^9, 
   3.575776935718094*^9}, {3.575777021833269*^9, 3.5757770291396384`*^9}, 
   3.5757998710198994`*^9, 3.577450622425292*^9, 3.577450658119861*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"eqs", " ", "=", " ", 
  RowBox[{"Simplify", "[", 
   RowBox[{"Solve", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"eqdotp", ",", "eqdotT", ",", "eqp", ",", "eqU"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"dotp", ",", "dotT", ",", "mass", ",", "U"}], "}"}]}], "]"}], 
   "]"}]}]], "Input",
 CellChangeTimes->{3.535458868210401*^9}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"dotp", "\[Rule]", 
     FractionBox[
      RowBox[{"dotE", " ", "R"}], 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"cv", "+", "R"}], ")"}], " ", "V"}]]}], ",", 
    RowBox[{"dotT", "\[Rule]", 
     FractionBox[
      RowBox[{"dotE", " ", "R", " ", "T"}], 
      RowBox[{
       RowBox[{"cv", " ", "p", " ", "V"}], "+", 
       RowBox[{"p", " ", "R", " ", "V"}]}]]}], ",", 
    RowBox[{"mass", "\[Rule]", 
     FractionBox[
      RowBox[{"p", " ", "V"}], 
      RowBox[{"R", " ", "T"}]]}], ",", 
    RowBox[{"U", "\[Rule]", 
     FractionBox[
      RowBox[{"cv", " ", "p", " ", "V"}], "R"]}]}], "}"}], "}"}]], "Output",
 CellChangeTimes->{
  3.44585944694794*^9, 3.445860084740733*^9, {3.4458602040680943`*^9, 
   3.4458602255992064`*^9}, 3.4458613136859927`*^9, 3.44586157968429*^9, 
   3.535372463571471*^9, 3.53537645865625*^9, 3.535396339859375*^9, 
   3.53539638084375*^9, 3.5353964531875*^9, 3.53545542589041*^9, 
   3.535458123853208*^9, 3.535458228867543*^9, 3.535458913007924*^9, 
   3.53552598528125*^9, 3.53552639946875*^9, 3.535526464640625*^9, 
   3.535526585796875*^9, 3.535526704953125*^9, 3.535541107828125*^9, 
   3.5684467745729313`*^9, 3.568449494996645*^9, 3.5684505251879606`*^9, 
   3.5684505803574767`*^9, 3.5684506846309032`*^9, 3.568451031599059*^9, 
   3.5684510623430595`*^9, 3.568451203329059*^9, 3.568454858808698*^9, 
   3.5684568212599335`*^9, 3.568457452175836*^9, 3.5684588404238386`*^9, 
   3.5684589731881137`*^9, 3.5684590548472786`*^9, 3.568521330139377*^9, 
   3.5685221876984153`*^9, 3.5685223075584154`*^9, 3.5719993961119275`*^9, 
   3.5720003687395124`*^9, 3.572000498453233*^9, 3.5720005531912756`*^9, 
   3.572003899207822*^9, 3.5720050607171297`*^9, 3.5720086349124327`*^9, 
   3.572009245761512*^9, 3.572161169287213*^9, 3.5721614591731987`*^9, 
   3.572161672447524*^9, 3.572167675648822*^9, 3.5721679964308968`*^9, 
   3.5721737447226872`*^9, 3.572174176781889*^9, {3.575776913049615*^9, 
   3.5757769357493176`*^9}, {3.5757770218644934`*^9, 3.575777029170862*^9}, 
   3.5757998710888996`*^9, 3.577450622856335*^9, 3.5774506581628656`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"dp", " ", "=", " ", 
  RowBox[{"Collect", "[", 
   RowBox[{
    RowBox[{"dotp", "/.", 
     RowBox[{"eqs", "[", 
      RowBox[{"[", "1", "]"}], "]"}]}], ",", 
    RowBox[{"{", 
     RowBox[{"qm", ",", "dotv"}], "}"}]}], "]"}]}]], "Input"],

Cell[BoxData[
 FractionBox[
  RowBox[{"dotE", " ", "R"}], 
  RowBox[{
   RowBox[{"(", 
    RowBox[{"cv", "+", "R"}], ")"}], " ", "V"}]]], "Output",
 CellChangeTimes->{
  3.445859447088564*^9, 3.445860084818857*^9, {3.445860204427467*^9, 
   3.4458602257398305`*^9}, 3.445861313826617*^9, 3.445861579731165*^9, 
   3.535372464742529*^9, 3.535376458734375*^9, 3.535396339953125*^9, 
   3.535396380984375*^9, 3.535396453265625*^9, 3.5354554259060345`*^9, 
   3.5354581238844576`*^9, 3.5354582288831677`*^9, 3.535458913023549*^9, 
   3.535525985703125*^9, 3.5355263995625*^9, 3.535526464765625*^9, 
   3.535526585953125*^9, 3.5355267050625*^9, 3.535541108546875*^9, 
   3.568446774637931*^9, 3.5684494950346527`*^9, 3.5684505252199636`*^9, 
   3.5684505803924804`*^9, 3.568450684670907*^9, 3.568451031638059*^9, 
   3.568451062372059*^9, 3.568451203356059*^9, 3.5684548588507023`*^9, 
   3.568456821305938*^9, 3.568457452218836*^9, 3.568458840469843*^9, 
   3.5684589734821434`*^9, 3.5684590548752813`*^9, 3.5685213301633797`*^9, 
   3.5685221880794153`*^9, 3.568522307585415*^9, 3.5719993961431303`*^9, 
   3.5720003687551126`*^9, 3.572000498468833*^9, 3.5720005532224755`*^9, 
   3.5720038992390223`*^9, 3.57200506074833*^9, 3.5720086349474363`*^9, 
   3.572009245788514*^9, 3.5721611693132153`*^9, 3.572161459197201*^9, 
   3.572161672466526*^9, 3.572167675672824*^9, 3.572167996457899*^9, 
   3.57217374475169*^9, 3.572174176804891*^9, {3.5757769130652266`*^9, 
   3.5757769357805414`*^9}, {3.5757770218957167`*^9, 3.575777029202086*^9}, 
   3.5757998711158996`*^9, 3.5774506228983393`*^9, 3.5774506581888685`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"dT", "=", "  ", 
  RowBox[{"Collect", "[", 
   RowBox[{
    RowBox[{"dotT", "/.", 
     RowBox[{"eqs", "[", 
      RowBox[{"[", "1", "]"}], "]"}]}], ",", 
    RowBox[{"{", 
     RowBox[{"qm", ",", "dotv"}], "}"}]}], "]"}]}]], "Input"],

Cell[BoxData[
 FractionBox[
  RowBox[{"dotE", " ", "R", " ", "T"}], 
  RowBox[{
   RowBox[{"cv", " ", "p", " ", "V"}], "+", 
   RowBox[{"p", " ", "R", " ", "V"}]}]]], "Output",
 CellChangeTimes->{
  3.445859447151064*^9, 3.4458600849126067`*^9, {3.4458602045368414`*^9, 
   3.4458602257710805`*^9}, 3.4458613138891163`*^9, 3.445861579871789*^9, 
   3.5353724651797237`*^9, 3.5353764588125*^9, 3.535396340078125*^9, 
   3.53539638109375*^9, 3.53539645334375*^9, 3.535455425937284*^9, 
   3.5354581239000826`*^9, 3.5354582289144173`*^9, 3.535458913039174*^9, 
   3.53552598584375*^9, 3.53552639965625*^9, 3.53552646484375*^9, 
   3.535526586046875*^9, 3.53552670515625*^9, 3.535541108625*^9, 
   3.5684467746919312`*^9, 3.5684494950606575`*^9, 3.5684505252459664`*^9, 
   3.568450580450486*^9, 3.568450684706911*^9, 3.568451031671059*^9, 
   3.5684510624090595`*^9, 3.5684512033850594`*^9, 3.568454858888706*^9, 
   3.568456821351942*^9, 3.5684574522608356`*^9, 3.568458840525849*^9, 
   3.568458973522147*^9, 3.5684590549132853`*^9, 3.5685213302023835`*^9, 
   3.5685221881124153`*^9, 3.568522307634415*^9, 3.571999396174333*^9, 
   3.572000368786313*^9, 3.5720004985000334`*^9, 3.572000553253676*^9, 
   3.5720038992546225`*^9, 3.5720050607639303`*^9, 3.5720086349834394`*^9, 
   3.572009245814517*^9, 3.5721611693412185`*^9, 3.5721614592202034`*^9, 
   3.572161672487528*^9, 3.5721676756958265`*^9, 3.5721679964819016`*^9, 
   3.572173744780693*^9, 3.5721741768288937`*^9, {3.575776913096451*^9, 
   3.575776935796153*^9}, {3.575777021911329*^9, 3.575777029217698*^9}, 
   3.5757998711478996`*^9, 3.577450622933343*^9, 3.5774506582128706`*^9}]
}, Open  ]],

Cell["For the case of constant volume", "Text"],

Cell[BoxData[
 RowBox[{
  RowBox[{"dotv", " ", "=", " ", "0"}], ";"}]], "Input"],

Cell[CellGroupData[{

Cell[BoxData["dotp"], "Input"],

Cell[BoxData["dotp"], "Output",
 CellChangeTimes->{
  3.535396594625*^9, 3.5354554259529085`*^9, 3.5354581239313326`*^9, 
   3.5354582289456663`*^9, 3.535458913054799*^9, 3.53552598596875*^9, 
   3.535526399765625*^9, 3.535526464953125*^9, 3.535526586140625*^9, 
   3.535526705796875*^9, 3.535541108734375*^9, 3.568446774758931*^9, 
   3.5684494952777014`*^9, 3.5684505252859707`*^9, 3.5684505807215133`*^9, 
   3.5684506847509155`*^9, 3.5684510317220592`*^9, 3.568451062467059*^9, 
   3.5684512034230595`*^9, 3.56845485892771*^9, 3.568456821408948*^9, 
   3.568457452317836*^9, 3.568458840596856*^9, 3.5684589735771523`*^9, 
   3.56845905495529*^9, 3.568521330242388*^9, 3.568522188174415*^9, 
   3.568522307673415*^9, 3.571999396205536*^9, 3.5720003688175135`*^9, 
   3.5720004985468335`*^9, 3.572000553300476*^9, 3.572003899285823*^9, 
   3.5720050607951307`*^9, 3.572008635022444*^9, 3.57200924585052*^9, 
   3.572161169377222*^9, 3.5721614592522063`*^9, 3.5721616725145307`*^9, 
   3.5721676757308297`*^9, 3.5721679965169053`*^9, 3.572173744818697*^9, 
   3.572174176864897*^9, {3.5757769131120625`*^9, 3.5757769358273773`*^9}, {
   3.5757770219425526`*^9, 3.575777029248922*^9}, 3.5757998711948996`*^9, 
   3.5774506229843483`*^9, 3.577450658248874*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"eqs", " ", "=", " ", 
  RowBox[{"Solve", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"eqdotp", ",", "eqdotT", ",", "eqU", ",", "eqp"}], "}"}], ",", 
    RowBox[{"{", 
     RowBox[{"dotp", ",", "dotT", ",", "mass", ",", "U"}], "}"}]}], 
   "]"}]}]], "Input",
 CellChangeTimes->{3.5354588756793423`*^9}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"dotp", "\[Rule]", 
     FractionBox[
      RowBox[{"dotE", " ", "R"}], 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"cv", "+", "R"}], ")"}], " ", "V"}]]}], ",", 
    RowBox[{"dotT", "\[Rule]", 
     FractionBox[
      RowBox[{"dotE", " ", "R", " ", "T"}], 
      RowBox[{"p", " ", 
       RowBox[{"(", 
        RowBox[{"cv", "+", "R"}], ")"}], " ", "V"}]]}], ",", 
    RowBox[{"mass", "\[Rule]", 
     FractionBox[
      RowBox[{"p", " ", "V"}], 
      RowBox[{"R", " ", "T"}]]}], ",", 
    RowBox[{"U", "\[Rule]", 
     FractionBox[
      RowBox[{"cv", " ", "p", " ", "V"}], "R"]}]}], "}"}], "}"}]], "Output",
 CellChangeTimes->{
  3.4458594473073125`*^9, 3.445860085068856*^9, {3.4458602046930904`*^9, 
   3.4458602258648295`*^9}, 3.4458613140297403`*^9, 3.445861579981163*^9, 
   3.5353724652734084`*^9, 3.535376459296875*^9, 3.535396340203125*^9, 
   3.53539638128125*^9, 3.535396453828125*^9, 3.53539659903125*^9, 
   3.5354554259997826`*^9, 3.535458123978207*^9, 3.535458228992541*^9, 
   3.535458913086049*^9, 3.5355259861875*^9, 3.535526399921875*^9, 
   3.535526465109375*^9, 3.53552658628125*^9, 3.53552670596875*^9, 
   3.535541108890625*^9, 3.568446774800931*^9, 3.56844949532171*^9, 
   3.5684505253349752`*^9, 3.5684505807655177`*^9, 3.568450684789919*^9, 
   3.568451031936059*^9, 3.5684510625100594`*^9, 3.5684512034580593`*^9, 
   3.5684548589707146`*^9, 3.5684568214539523`*^9, 3.5684574523648357`*^9, 
   3.568458840655862*^9, 3.5684589736231575`*^9, 3.5684590550072947`*^9, 
   3.568521330288392*^9, 3.568522188210415*^9, 3.568522307753415*^9, 
   3.5719993962367387`*^9, 3.572000368848713*^9, 3.5720004985780334`*^9, 
   3.5720005533472767`*^9, 3.572003899317023*^9, 3.57200506082633*^9, 
   3.5720086350604477`*^9, 3.572009245888524*^9, 3.5721611694092255`*^9, 
   3.5721614592852097`*^9, 3.572161672540533*^9, 3.572167675760833*^9, 
   3.5721679965479083`*^9, 3.5721737448527*^9, 3.5721741768969*^9, {
   3.5757769131432867`*^9, 3.5757769358586006`*^9}, {3.5757770219737763`*^9, 
   3.5757770292801456`*^9}, 3.5757998712368994`*^9, 3.5774506230293527`*^9, 
   3.5774506582788773`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"dp", " ", "=", " ", 
  RowBox[{"Collect", "[", 
   RowBox[{
    RowBox[{"dotp", "/.", 
     RowBox[{"eqs", "[", 
      RowBox[{"[", "1", "]"}], "]"}]}], ",", 
    RowBox[{"{", 
     RowBox[{"qm", ",", "dotS"}], "}"}]}], "]"}]}]], "Input"],

Cell[BoxData[
 FractionBox[
  RowBox[{"dotE", " ", "R"}], 
  RowBox[{
   RowBox[{"(", 
    RowBox[{"cv", "+", "R"}], ")"}], " ", "V"}]]], "Output",
 CellChangeTimes->{
  3.445859447354187*^9, 3.4458600852719793`*^9, {3.4458602048337145`*^9, 
   3.4458602258960795`*^9}, 3.4458613140922403`*^9, 3.445861580043663*^9, 
   3.535372465335865*^9, 3.53537645934375*^9, 3.5353963403125*^9, 
   3.535396381390625*^9, 3.535396453921875*^9, 3.5354554260154066`*^9, 
   3.535458123993832*^9, 3.5354582290081654`*^9, 3.5354589131016736`*^9, 
   3.53552598628125*^9, 3.535526400015625*^9, 3.535526465203125*^9, 
   3.535526586359375*^9, 3.5355267060625*^9, 3.53554110959375*^9, 
   3.5684467748729315`*^9, 3.5684494953717203`*^9, 3.5684505253779793`*^9, 
   3.568450580827524*^9, 3.568450684838924*^9, 3.5684510319680595`*^9, 
   3.568451062542059*^9, 3.5684512034890594`*^9, 3.568454859016719*^9, 
   3.5684568215059576`*^9, 3.568457452407836*^9, 3.5684588409748936`*^9, 
   3.5684589736741624`*^9, 3.568459055047299*^9, 3.568521330338397*^9, 
   3.568522188255415*^9, 3.568522307804415*^9, 3.5719993962679415`*^9, 
   3.5720003688799133`*^9, 3.572000498609234*^9, 3.572000553550078*^9, 
   3.572003899348223*^9, 3.5720050608575306`*^9, 3.5720086350904503`*^9, 
   3.572009245918527*^9, 3.5721611694352274`*^9, 3.572161459309212*^9, 
   3.572161672558535*^9, 3.572167675784835*^9, 3.5721679965739107`*^9, 
   3.572173744880703*^9, 3.5721741769209023`*^9, {3.57577691317451*^9, 
   3.5757769358742127`*^9}, {3.575777022005*^9, 3.5757770292957573`*^9}, 
   3.5757998712759*^9, 3.5774506230653563`*^9, 3.5774506583038797`*^9}]
}, Open  ]],

Cell["\<\
The pressure is a function of the entropy flow dotS only. The massflow enters \
only inderectly since it affects T. \
\>", "Text"],

Cell["The energy-pressure capacitance is defined as", "Text"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Cep", " ", "=", " ", 
  RowBox[{"dotE", "/", "dp"}]}]], "Input"],

Cell[BoxData[
 FractionBox[
  RowBox[{
   RowBox[{"(", 
    RowBox[{"cv", "+", "R"}], ")"}], " ", "V"}], "R"]], "Output",
 CellChangeTimes->{
  3.445859447416687*^9, 3.4458600853501043`*^9, {3.4458602049118385`*^9, 
   3.445860225927329*^9}, 3.445861314139115*^9, 3.4458615800905375`*^9, 
   3.535372465398321*^9, 3.53537645940625*^9, 3.53539634040625*^9, 
   3.535396381546875*^9, 3.535396454015625*^9, 3.5354554260310316`*^9, 
   3.535458124025082*^9, 3.535458229039415*^9, 3.5354589131172986`*^9, 
   3.535525986375*^9, 3.53552640009375*^9, 3.535526465296875*^9, 
   3.5355265864375*^9, 3.53552670615625*^9, 3.5355411096875*^9, 
   3.568446774942931*^9, 3.5684494954197297`*^9, 3.5684505254189835`*^9, 
   3.5684505808655276`*^9, 3.568450684875928*^9, 3.568451031997059*^9, 
   3.568451062585059*^9, 3.5684512035170593`*^9, 3.568454859065724*^9, 
   3.5684568215519624`*^9, 3.568457452719836*^9, 3.568458841025899*^9, 
   3.568458973713166*^9, 3.5684590550803022`*^9, 3.5685213303654*^9, 
   3.568522188279415*^9, 3.5685223082704153`*^9, 3.5719993962991447`*^9, 
   3.5720003689111137`*^9, 3.572000498624834*^9, 3.572000553581278*^9, 
   3.572003899363823*^9, 3.572005060888731*^9, 3.5720086351224537`*^9, 
   3.57200924594553*^9, 3.5721611694642305`*^9, 3.5721614593342147`*^9, 
   3.572161672576537*^9, 3.5721676758078375`*^9, 3.5721679966039143`*^9, 
   3.5721737449087057`*^9, 3.5721741769489055`*^9, {3.5757769131901217`*^9, 
   3.575776935889825*^9}, {3.575777022020612*^9, 3.5757770293269815`*^9}, 
   3.5757998713118997`*^9, 3.57745062310136*^9, 3.577450658327882*^9}]
}, Open  ]],

Cell[BoxData[
 FormBox[
  RowBox[{
   RowBox[{"When", " ", "solving", " ", "the", " ", "equation"}], ",", " ", 
   RowBox[{
   "temperature", " ", "and", " ", "mass", "  ", "are", " ", "reduced", " ", 
    "to", " ", "\"\<book-keeping variables\>\"", " ", "that", " ", "can", " ",
     "be", " ", "calculated", " ", "after", " ", "the", " ", "pressure", " ", 
    "has", " ", "been", " ", 
    RowBox[{"calculated", "."}]}]}], TextForm]], "Text"],

Cell["The mass can be calculated from", "Text"],

Cell[BoxData[
 RowBox[{"mexpr0", "=."}]], "Input",
 CellChangeTimes->{{3.535526390484375*^9, 3.53552639084375*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"systemEquationsDA", "=", " ", 
   RowBox[{"{", 
    RowBox[{"mass", " ", "==", " ", 
     FractionBox[
      RowBox[{"qmp1", "+", "qmp2"}], "s"]}], "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.535430156909875*^9, 3.535430207704972*^9}, {
   3.5354328163620415`*^9, 3.535432889533148*^9}, 3.535525965859375*^9, {
   3.5355264545*^9, 3.535526457390625*^9}, {3.568455142797043*^9, 
   3.5684551435060425`*^9}, {3.568455182633043*^9, 3.5684552084050426`*^9}, {
   3.5720183319802775`*^9, 3.572018335221463*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"systemVariables", "=", 
   RowBox[{"{", "mass", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.535432839934885*^9, 3.535432882940875*^9}, {
  3.568455146335043*^9, 3.568455147005043*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"T", " ", "=", " ", "Tav"}], ";"}], "\n", 
 RowBox[{
  RowBox[{"p", " ", "=", " ", "pav"}], ";"}]}], "Input"],

Cell["The temperature can be calculated as", "Text"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Texpr", " ", "=", " ", 
  RowBox[{"T", "/.", 
   RowBox[{
    RowBox[{"Solve", "[", 
     RowBox[{"eqp", ",", "T"}], "]"}], "[", 
    RowBox[{"[", "1", "]"}], "]"}]}]}]], "Input"],

Cell[BoxData[
 FractionBox[
  RowBox[{"pav", " ", "V"}], 
  RowBox[{"mass", " ", "R"}]]], "Output",
 CellChangeTimes->{
  3.44585944768231*^9, 3.4458600856157274`*^9, {3.4458602057555833`*^9, 
   3.445860226224202*^9}, 3.4458613143578634`*^9, 3.445861580278036*^9, 
   3.5353724672407846`*^9, 3.535376459703125*^9, 3.53539634075*^9, 
   3.5353963819375*^9, 3.53539645428125*^9, 3.5354554261091547`*^9, 
   3.5354581240875816`*^9, 3.5354582291019135`*^9, 3.535458913179798*^9, 
   3.535525987*^9, 3.535526400390625*^9, 3.535526465578125*^9, 
   3.535526586640625*^9, 3.535526706953125*^9, 3.535541109921875*^9, 
   3.5684467751039314`*^9, 3.568449495529752*^9, 3.5684505255119925`*^9, 
   3.568450580974539*^9, 3.568450685158956*^9, 3.568451032119059*^9, 
   3.568451062884059*^9, 3.5684512037940593`*^9, 3.5684548593807554`*^9, 
   3.5684568216519723`*^9, 3.568457452821836*^9, 3.568458841121908*^9, 
   3.5684589738021755`*^9, 3.5684590551883125`*^9, 3.568521330436407*^9, 
   3.568522188391415*^9, 3.568522308442415*^9, 3.5719993963771515`*^9, 
   3.5720003689891143`*^9, 3.572000498702834*^9, 3.5720005536748786`*^9, 
   3.5720038994262238`*^9, 3.572005060951131*^9, 3.5720086352004614`*^9, 
   3.572009246029538*^9, 3.5721611695402384`*^9, 3.572161459398221*^9, 
   3.5721616726245413`*^9, 3.5721676758688436`*^9, 3.5721679966659203`*^9, 
   3.5721737449757123`*^9, 3.5721741770119114`*^9, {3.5757769132369576`*^9, 
   3.5757769359522724`*^9}, {3.5757770220830593`*^9, 3.575777029373817*^9}, 
   3.5757998715589*^9, 3.5774506231983695`*^9, 3.577450658661916*^9}]
}, Open  ]],

Cell["This is to be preffered from a numerical point of view", "Text"],

Cell[BoxData[
 FormBox[
  RowBox[{"fak", "=", 
   FractionBox["1", 
    RowBox[{"1", "-", "alfa"}]]}], TextForm]], "Text"],

Cell[BoxData[
 FractionBox["1", 
  RowBox[{"1", "-", "alfa"}]]], "Output"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"ZcEPexpr", " ", "=", " ", 
  FractionBox[
   RowBox[{"fak", " ", "h"}], "Cep"]}]], "Input"],

Cell[BoxData[
 FractionBox[
  RowBox[{"fak", " ", "mTimestep", " ", "R"}], 
  RowBox[{
   RowBox[{"(", 
    RowBox[{"cv", "+", "R"}], ")"}], " ", "V"}]]], "Output",
 CellChangeTimes->{
  3.4458594477760596`*^9, 3.4458600857719765`*^9, {3.445860206036832*^9, 
   3.445860226302327*^9}, 3.4458613144828625`*^9, 3.445861580387411*^9, 
   3.535372467787278*^9, 3.5353764598125*^9, 3.535396340984375*^9, 
   3.53539638259375*^9, 3.53539645446875*^9, 3.535455426124779*^9, 
   3.535458124118831*^9, 3.5354582291175385`*^9, 3.535458913195423*^9, 
   3.535525987109375*^9, 3.53552640046875*^9, 3.53552646565625*^9, 
   3.53552658671875*^9, 3.535526707046875*^9, 3.535541110609375*^9, 
   3.5684467751369314`*^9, 3.5684494955697594`*^9, 3.568450525553997*^9, 
   3.5684505810315447`*^9, 3.568450685207961*^9, 3.5684510321560593`*^9, 
   3.5684510629190593`*^9, 3.568451203829059*^9, 3.56845485942776*^9, 
   3.5684568217049775`*^9, 3.568457452861836*^9, 3.568458841163913*^9, 
   3.5684589738381786`*^9, 3.5684590554813423`*^9, 3.5685213304824114`*^9, 
   3.5685221884194155`*^9, 3.568522308505415*^9, 3.5719993965955706`*^9, 
   3.572000369020314*^9, 3.5720004987340345`*^9, 3.5720005537060785`*^9, 
   3.5720038994418235`*^9, 3.572005060966731*^9, 3.572008635228464*^9, 
   3.572009246060541*^9, 3.572161169568241*^9, 3.5721614594222236`*^9, 
   3.5721616726435432`*^9, 3.572167675893846*^9, 3.572167996691923*^9, 
   3.5721737450037155`*^9, 3.572174177035914*^9, {3.575776913268182*^9, 
   3.575776935967884*^9}, {3.575777022098672*^9, 3.575777029389429*^9}, 
   3.5757998715898995`*^9, 3.5774506232323728`*^9, 3.577450658696919*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData["Cep"], "Input",
 CellChangeTimes->{{3.535396539625*^9, 3.535396540234375*^9}}],

Cell[BoxData[
 FractionBox[
  RowBox[{
   RowBox[{"(", 
    RowBox[{"cv", "+", "R"}], ")"}], " ", "V"}], "R"]], "Output",
 CellChangeTimes->{
  3.535396540953125*^9, 3.535455426171653*^9, 3.5354581241657057`*^9, 
   3.5354582291644125`*^9, 3.535458913226673*^9, 3.535525987296875*^9, 
   3.5355264011875*^9, 3.535526466390625*^9, 3.535526586859375*^9, 
   3.53552670721875*^9, 3.53554111078125*^9, 3.5684467752509313`*^9, 
   3.5684494956467752`*^9, 3.568450525809023*^9, 3.568450581132554*^9, 
   3.568450685278968*^9, 3.5684510322250595`*^9, 3.568451063014059*^9, 
   3.5684512038850594`*^9, 3.568454859506768*^9, 3.5684568217919865`*^9, 
   3.568457452958836*^9, 3.5684588412619224`*^9, 3.568458973911186*^9, 
   3.5684590555463486`*^9, 3.5685213309094543`*^9, 3.568522188482415*^9, 
   3.5685223086054153`*^9, 3.571999396657976*^9, 3.572000369067115*^9, 
   3.572000498952436*^9, 3.5720005537684793`*^9, 3.572003899488624*^9, 
   3.5720050610135317`*^9, 3.57200863528647*^9, 3.572009246317567*^9, 
   3.572161169619246*^9, 3.572161459472228*^9, 3.5721616726845474`*^9, 
   3.572167675942851*^9, 3.572167996745928*^9, 3.5721737450627213`*^9, 
   3.5721741770869193`*^9, {3.575776913299405*^9, 3.57577693601472*^9}, {
   3.575777022145507*^9, 3.5757770294362645`*^9}, 3.5757998716498995`*^9, 
   3.57745062329838*^9, 3.577450658747924*^9}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["Characteristics", "Subsection"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"c", " ", "=", " ", 
  RowBox[{"{", 
   RowBox[{"cp1", ",", "cp2"}], "}"}]}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"cp1", ",", "cp2"}], "}"}]], "Output",
 CellChangeTimes->{
  3.445859447838559*^9, 3.4458600858657255`*^9, 3.445860226380451*^9, 
   3.445861314560987*^9, 3.44586158044991*^9, 3.535372467865349*^9, 
   3.535376490375*^9, 3.535396341421875*^9, 3.53539638278125*^9, 
   3.5353964549375*^9, 3.535455426187278*^9, 3.5354581241813307`*^9, 
   3.5354582291800375`*^9, 3.535458913242298*^9, 3.535525987390625*^9, 
   3.53552640128125*^9, 3.53552646653125*^9, 3.53552658746875*^9, 
   3.53552670784375*^9, 3.535541110859375*^9, 3.5684467755169315`*^9, 
   3.5684494957057867`*^9, 3.568450525841026*^9, 3.568450581166558*^9, 
   3.568450685312971*^9, 3.568451032275059*^9, 3.5684510630670595`*^9, 
   3.5684512039180593`*^9, 3.568454859537771*^9, 3.568456821866994*^9, 
   3.568457453006836*^9, 3.568458841304927*^9, 3.56845897394919*^9, 
   3.5684590555733514`*^9, 3.5685213309424577`*^9, 3.5685221885074153`*^9, 
   3.568522308675415*^9, 3.5719993966735783`*^9, 3.572000369269916*^9, 
   3.572000498999236*^9, 3.5720005537996798`*^9, 3.572003899519824*^9, 
   3.572005061044732*^9, 3.5720086354434857`*^9, 3.57200924635157*^9, 
   3.5721611696472487`*^9, 3.5721614594952307`*^9, 3.5721616727035494`*^9, 
   3.572167675966853*^9, 3.5721679967739305`*^9, 3.572173745091724*^9, 
   3.572174177113922*^9, {3.5757769133306293`*^9, 3.5757769360303316`*^9}, {
   3.575777022176731*^9, 3.5757770294674883`*^9}, 3.5757998716828995`*^9, 
   3.577450623336383*^9, 3.577450658774927*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"q", " ", "=", " ", 
  RowBox[{"{", 
   RowBox[{"qmp1", ",", "qmp2", ",", "dEp1", ",", "dEp2"}], "}"}]}]], "Input",
 CellChangeTimes->{{3.5684503894803915`*^9, 3.5684503937628193`*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"qmp1", ",", "qmp2", ",", "dEp1", ",", "dEp2"}], "}"}]], "Output",
 CellChangeTimes->{
  3.4458594479166837`*^9, 3.4458600859438505`*^9, 3.4458602264742007`*^9, 
   3.4458613146391115`*^9, 3.44586158051241*^9, 3.5353724679434195`*^9, 
   3.5353765025*^9, 3.535396341515625*^9, 3.535396382875*^9, 
   3.5353964550625*^9, 3.535455426202902*^9, 3.5354581241969557`*^9, 
   3.5354582291956615`*^9, 3.535458913257923*^9, 3.5355259878125*^9, 
   3.535526401375*^9, 3.53552646665625*^9, 3.535526587546875*^9, 
   3.53552670796875*^9, 3.535541110953125*^9, 3.568446775553931*^9, 
   3.568449495755797*^9, 3.56845052588203*^9, 3.5684505812165627`*^9, 
   3.5684506853519754`*^9, 3.5684510323070593`*^9, 3.568451063118059*^9, 
   3.568451203946059*^9, 3.568454859575775*^9, 3.5684568219209995`*^9, 
   3.5684574530558357`*^9, 3.568458841350931*^9, 3.568458973984193*^9, 
   3.568459055609355*^9, 3.568521330984462*^9, 3.568522188575415*^9, 
   3.5685223087054152`*^9, 3.5719993967047806`*^9, 3.572000369301116*^9, 
   3.5720004990148363`*^9, 3.5720005538308797`*^9, 3.5720038995510244`*^9, 
   3.572005061075932*^9, 3.5720086354934907`*^9, 3.5720092463825736`*^9, 
   3.5721611697572603`*^9, 3.572161459519233*^9, 3.5721616727225513`*^9, 
   3.572167675991856*^9, 3.5721679967989335`*^9, 3.572173745119727*^9, 
   3.572174177142925*^9, {3.575776913346241*^9, 3.575776936061556*^9}, {
   3.5757770221923428`*^9, 3.5757770294831004`*^9}, 3.5757998717088995`*^9, 
   3.5774506233733873`*^9, 3.577450658799929*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"dE", " ", "=", " ", 
  RowBox[{"{", 
   RowBox[{"dEp1", ",", "dEp2"}], "}"}]}]], "Input",
 CellChangeTimes->{{3.5684503952289658`*^9, 3.5684503959470377`*^9}}],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"dEp1", ",", "dEp2"}], "}"}]], "Output",
 CellChangeTimes->{
  3.445859447979183*^9, 3.4458600860219746`*^9, 3.4458602265367002`*^9, 
   3.4458613146859865`*^9, 3.4458615805749097`*^9, 3.5353724680058756`*^9, 
   3.53537650521875*^9, 3.535396341625*^9, 3.535396382984375*^9, 
   3.53539645515625*^9, 3.535455426218527*^9, 3.5354581242282057`*^9, 
   3.5354582292269115`*^9, 3.535458913289172*^9, 3.53552598790625*^9, 
   3.535526401453125*^9, 3.535526466828125*^9, 3.535526587625*^9, 
   3.5355267080625*^9, 3.53554111165625*^9, 3.568446775606931*^9, 
   3.5684494957978053`*^9, 3.568450525914033*^9, 3.568450581263568*^9, 
   3.5684506853829784`*^9, 3.5684510323590593`*^9, 3.5684510631680593`*^9, 
   3.5684512039770594`*^9, 3.5684548596217794`*^9, 3.5684568222630334`*^9, 
   3.568457453093836*^9, 3.568458841395936*^9, 3.568458974035198*^9, 
   3.5684590556423583`*^9, 3.5685213310124645`*^9, 3.5685221886034155`*^9, 
   3.568522308758415*^9, 3.571999396735984*^9, 3.572000369316716*^9, 
   3.5720004990460367`*^9, 3.5720005538620796`*^9, 3.5720038995666246`*^9, 
   3.572005061091532*^9, 3.572008635523494*^9, 3.5720092464145765`*^9, 
   3.5721611697862625`*^9, 3.572161459543236*^9, 3.5721616727425537`*^9, 
   3.572167676018859*^9, 3.572167996824936*^9, 3.57217374525074*^9, 
   3.5721741771669273`*^9, {3.575776913377465*^9, 3.5757769360771675`*^9}, {
   3.575777022223567*^9, 3.5757770294987125`*^9}, 3.5757998717388997`*^9, 
   3.57745062340839*^9, 3.577450658824932*^9}]
}, Open  ]],

Cell[BoxData[
 RowBox[{"ZcEP", "=."}]], "Input"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"zc", "=", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"ZcEP", ",", "0"}], "}"}], ",", "\n", "\t\t", 
    RowBox[{"{", 
     RowBox[{"0", ",", "ZcEP"}], "}"}]}], "}"}]}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{"ZcEP", ",", "0"}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"0", ",", "ZcEP"}], "}"}]}], "}"}]], "Output",
 CellChangeTimes->{
  3.4458594481354322`*^9, 3.4458600862094736`*^9, 3.4458602267398243`*^9, 
   3.445861314842235*^9, 3.445861580637409*^9, 3.5353724680995607`*^9, 
   3.535376517328125*^9, 3.535396341734375*^9, 3.5353963831875*^9, 
   3.535396455265625*^9, 3.535455426249776*^9, 3.5354581242594557`*^9, 
   3.535458229242536*^9, 3.535458913304797*^9, 3.53552598803125*^9, 
   3.5355264015625*^9, 3.535526467609375*^9, 3.535526587734375*^9, 
   3.535526708171875*^9, 3.53554111178125*^9, 3.568446775753931*^9, 
   3.568449495863818*^9, 3.5684505259720387`*^9, 3.568450581318573*^9, 
   3.568450685445985*^9, 3.5684510324180593`*^9, 3.5684510632270594`*^9, 
   3.5684512040150595`*^9, 3.5684548596927867`*^9, 3.5684568223140383`*^9, 
   3.568457453149836*^9, 3.568458841450941*^9, 3.5684589740792027`*^9, 
   3.568459055693363*^9, 3.568521331108474*^9, 3.568522188681415*^9, 
   3.5685223088224154`*^9, 3.5719993967827873`*^9, 3.572000369363517*^9, 
   3.572000499077237*^9, 3.57200055390888*^9, 3.572003899597825*^9, 
   3.572005061122732*^9, 3.572008635564498*^9, 3.5720092464525805`*^9, 
   3.572161169821266*^9, 3.572161459577239*^9, 3.572161672769556*^9, 
   3.572167676052862*^9, 3.5721679969669504`*^9, 3.5721737452927437`*^9, 
   3.5721741772049313`*^9, {3.575776913393077*^9, 3.5757769361083913`*^9}, {
   3.5757770222547903`*^9, 3.575777029529936*^9}, 3.5757998717788997`*^9, 
   3.577450623983448*^9, 3.5774506588589354`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"cd", "=", 
  RowBox[{"{", 
   RowBox[{"cdp1expr", ",", "cdp2expr"}], "}"}]}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"cp2", "+", 
    RowBox[{"2", " ", 
     RowBox[{"(", 
      RowBox[{"dEp2", "+", 
       RowBox[{
        FractionBox["1", "2"], " ", "ka", " ", 
        RowBox[{"(", 
         RowBox[{"T0", "-", "Tav"}], ")"}]}]}], ")"}], " ", "ZcEP"}]}], ",", 
   RowBox[{"cp1", "+", 
    RowBox[{"2", " ", 
     RowBox[{"(", 
      RowBox[{"dEp1", "+", 
       RowBox[{
        FractionBox["1", "2"], " ", "ka", " ", 
        RowBox[{"(", 
         RowBox[{"T0", "-", "Tav"}], ")"}]}]}], ")"}], " ", "ZcEP"}]}]}], 
  "}"}]], "Output",
 CellChangeTimes->{
  3.445859448197932*^9, 3.4458600862875977`*^9, 3.4458602268179483`*^9, 
   3.4458613149203596`*^9, 3.4458615806999087`*^9, 3.535372468162017*^9, 
   3.535376521453125*^9, 3.53539634184375*^9, 3.53539638328125*^9, 
   3.535396455359375*^9, 3.5354554262654004`*^9, 3.5354581242750807`*^9, 
   3.535458229273785*^9, 3.535458913320422*^9, 3.535525988125*^9, 
   3.535526401640625*^9, 3.53552646796875*^9, 3.5355265878125*^9, 
   3.535526708265625*^9, 3.535541111859375*^9, 3.568446775991931*^9, 
   3.5684494959058266`*^9, 3.5684505260180435`*^9, 3.568450581369578*^9, 
   3.5684506854829884`*^9, 3.5684510324510593`*^9, 3.568451063280059*^9, 
   3.568451204042059*^9, 3.56845485972679*^9, 3.568456822368044*^9, 
   3.568457453189836*^9, 3.5684588414899454`*^9, 3.568458974113206*^9, 
   3.568459055724366*^9, 3.5685213311364765`*^9, 3.568522188736415*^9, 
   3.568522309189415*^9, 3.5719993968139906`*^9, 3.5720003693947167`*^9, 
   3.5720004991084375`*^9, 3.5720005539400806`*^9, 3.5720038996290245`*^9, 
   3.5720050611539326`*^9, 3.572008635595501*^9, 3.5720092464815836`*^9, 
   3.572161169847269*^9, 3.572161459601241*^9, 3.572161672788558*^9, 
   3.5721676760768642`*^9, 3.572167996996953*^9, 3.572173745324747*^9, 
   3.5721741772309337`*^9, {3.5757769134243*^9, 3.5757769361240034`*^9}, {
   3.5757770222704024`*^9, 3.57577702956116*^9}, 3.5757998718089*^9, 
   3.577450624052455*^9, 3.5774506588829374`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"dEk", " ", "=", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{
     FractionBox["ka", "2"], " ", 
     RowBox[{"(", 
      RowBox[{"T0", "-", "Tav"}], ")"}]}], ",", 
    RowBox[{
     FractionBox["ka", "2"], " ", 
     RowBox[{"(", 
      RowBox[{"T0", "-", "Tav"}], ")"}]}]}], "}"}]}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{
    FractionBox["1", "2"], " ", "ka", " ", 
    RowBox[{"(", 
     RowBox[{"T0", "-", "Tav"}], ")"}]}], ",", 
   RowBox[{
    FractionBox["1", "2"], " ", "ka", " ", 
    RowBox[{"(", 
     RowBox[{"T0", "-", "Tav"}], ")"}]}]}], "}"}]], "Output",
 CellChangeTimes->{
  3.4458594482448063`*^9, 3.4458600863657227`*^9, 3.4458602268960733`*^9, 
   3.445861314982859*^9, 3.4458615807467833`*^9, 3.535372468224473*^9, 
   3.535376525828125*^9, 3.5353963419375*^9, 3.53539638346875*^9, 
   3.535396455453125*^9, 3.535455426281025*^9, 3.5354581244157047`*^9, 
   3.53545822928941*^9, 3.535458913351672*^9, 3.53552598821875*^9, 
   3.53552640175*^9, 3.5355264680625*^9, 3.535526587890625*^9, 
   3.535526708390625*^9, 3.535541111953125*^9, 3.568446776067931*^9, 
   3.568449495941834*^9, 3.568450526054047*^9, 3.568450581433584*^9, 
   3.568450685524993*^9, 3.568451032494059*^9, 3.5684510633170595`*^9, 
   3.568451204073059*^9, 3.5684548597577934`*^9, 3.5684568224340506`*^9, 
   3.568457453228836*^9, 3.56845884153795*^9, 3.5684589741562104`*^9, 
   3.56845905576137*^9, 3.568521331187482*^9, 3.568522189042415*^9, 
   3.5685223092444153`*^9, 3.5719993968295918`*^9, 3.5720003694103165`*^9, 
   3.572000499139637*^9, 3.57200055397128*^9, 3.5720038996446247`*^9, 
   3.572005061185133*^9, 3.5720086356275043`*^9, 3.5720092465105867`*^9, 
   3.572161169873272*^9, 3.572161459626244*^9, 3.57216167280756*^9, 
   3.572167676202877*^9, 3.5721679970279565`*^9, 3.5721737453567505`*^9, 
   3.5721741773589463`*^9, {3.5757769134399123`*^9, 3.5757769361552267`*^9}, {
   3.575777022301626*^9, 3.5757770295767717`*^9}, 3.5757998718468995`*^9, 
   3.5774506241074605`*^9, 3.57745065890594*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"{", 
   RowBox[{"cdp2expr", ",", "cdp1expr"}], "}"}], " ", "=", " ", 
  RowBox[{"c", "+", 
   RowBox[{"2", " ", 
    RowBox[{"zc", ".", 
     RowBox[{"(", 
      RowBox[{"dE", "+", "dEk"}], ")"}]}]}]}]}]], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"cp1", "+", 
    RowBox[{"2", " ", 
     RowBox[{"(", 
      RowBox[{"dEp1", "+", 
       RowBox[{
        FractionBox["1", "2"], " ", "ka", " ", 
        RowBox[{"(", 
         RowBox[{"T0", "-", "Tav"}], ")"}]}]}], ")"}], " ", "ZcEP"}]}], ",", 
   RowBox[{"cp2", "+", 
    RowBox[{"2", " ", 
     RowBox[{"(", 
      RowBox[{"dEp2", "+", 
       RowBox[{
        FractionBox["1", "2"], " ", "ka", " ", 
        RowBox[{"(", 
         RowBox[{"T0", "-", "Tav"}], ")"}]}]}], ")"}], " ", "ZcEP"}]}]}], 
  "}"}]], "Output",
 CellChangeTimes->{
  3.4458594483073063`*^9, 3.4458600864438467`*^9, 3.4458602269898224`*^9, 
   3.4458613150453587`*^9, 3.4458615808874073`*^9, 3.5353724684274564`*^9, 
   3.535376529375*^9, 3.53539634203125*^9, 3.5353963835625*^9, 
   3.535396455546875*^9, 3.5354554263122745`*^9, 3.5354581244313293`*^9, 
   3.5354582293050346`*^9, 3.535458913367297*^9, 3.535525988328125*^9, 
   3.53552640184375*^9, 3.535526468140625*^9, 3.535526588*^9, 
   3.535526708484375*^9, 3.535541112046875*^9, 3.568446776272931*^9, 
   3.5684494959898434`*^9, 3.568450526091051*^9, 3.5684505814645877`*^9, 
   3.568450685590999*^9, 3.568451032542059*^9, 3.5684510633860593`*^9, 
   3.568451204105059*^9, 3.568454859794797*^9, 3.568456822500057*^9, 
   3.5684574532908363`*^9, 3.568458841591955*^9, 3.568458974202215*^9, 
   3.5684590557963734`*^9, 3.5685213312414875`*^9, 3.568522189114415*^9, 
   3.568522309278415*^9, 3.571999396860795*^9, 3.572000369441517*^9, 
   3.5720004991708374`*^9, 3.5720005540024805`*^9, 3.572003899675825*^9, 
   3.5720050612007327`*^9, 3.572008635657507*^9, 3.5720092465385895`*^9, 
   3.572161169898274*^9, 3.5721614597422557`*^9, 3.572161672826562*^9, 
   3.5721676762298794`*^9, 3.572167997055959*^9, 3.5721737453877535`*^9, 
   3.5721741773909492`*^9, {3.575776913471136*^9, 3.575776936170839*^9}, {
   3.57577702233285*^9, 3.5757770296079955`*^9}, 3.5757998718728995`*^9, 
   3.5774506241534653`*^9, 3.577450658929942*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell["Filtering of characteristics", "Subsubsection"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"cp1expr", "=", 
   RowBox[{
    RowBox[{"alpha", " ", "double"}], " ", "+", 
    RowBox[{
     RowBox[{"(", 
      RowBox[{"1", "-", "alpha"}], ")"}], " ", "cpl1r"}]}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"cp2expr", "=", 
   RowBox[{
    RowBox[{"alpha", " ", "cp2rf"}], " ", "+", 
    RowBox[{
     RowBox[{"(", 
      RowBox[{"1", "-", "alpha"}], ")"}], " ", "cpl2r"}]}]}], ";"}]}], "Input",
 CellChangeTimes->{{3.516294111390625*^9, 3.5162941551875*^9}, 
   3.5353765348125*^9, 3.53539053815625*^9}],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"cp1expr", " ", "=", " ", 
   RowBox[{"cdp1", "+", 
    RowBox[{"ZcEP", 
     FractionBox["ka", "2"], " ", 
     RowBox[{"(", 
      RowBox[{"T0", "-", "Tav"}], ")"}]}]}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"cp2expr", " ", "=", " ", 
   RowBox[{"cdp2", "+", 
    RowBox[{"ZcEP", 
     FractionBox[
      RowBox[{"ka", " "}], "2"], 
     RowBox[{"(", 
      RowBox[{"T0", "-", "Tav"}], ")"}]}]}]}], ";"}]}], "Input",
 CellGroupingRules->{GroupTogetherGrouping, 10000.},
 CellChangeTimes->{{3.5353703993044605`*^9, 3.5353704089374967`*^9}, 
   3.605864722212282*^9}],

Cell[BoxData[
 RowBox[{"fak", "=."}]], "Input",
 CellGroupingRules->{GroupTogetherGrouping, 10000.},
 CellChangeTimes->{{3.5354585055339465`*^9, 3.5354585107681875`*^9}, 
   3.605864722212282*^9}]
}, Closed]],

Cell[BoxData[
 RowBox[{
  RowBox[{"initialExpressions", " ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"fak", "==", 
      RowBox[{"1", "/", 
       RowBox[{"(", 
        RowBox[{"1", "-", "alpha"}], ")"}]}]}], ",", "\[IndentingNewLine]", 
     RowBox[{"Tav", "==", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"Tp1", "+", "Tp2"}], ")"}], "/", "2"}]}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"pav", "==", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"pp1", "+", "pp2"}], ")"}], "/", "2"}]}], " ", ",", 
     "\[IndentingNewLine]", 
     RowBox[{"mass", "==", 
      FractionBox[
       RowBox[{"pav", " ", "V"}], 
       RowBox[{"Tav", " ", "R"}]]}]}], "\[IndentingNewLine]", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.535525933015625*^9, 3.535525934390625*^9}, {
  3.572018358400789*^9, 3.572018368048341*^9}, {3.5721679651057644`*^9, 
  3.5721679812263765`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"initialValues", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"Tav", "==", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"Tp1", "+", "Tp2"}], ")"}], "/", "2"}]}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"pav", "==", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"pp1", "+", "pp2"}], ")"}], "/", "2"}]}], " ", ",", 
     "\[IndentingNewLine]", 
     RowBox[{"mass", "==", 
      FractionBox[
       RowBox[{"pav", " ", "V"}], 
       RowBox[{"Tav", " ", "R"}]]}], ",", "\[IndentingNewLine]", 
     RowBox[{"ZcEP1", "==", "ZcEPexpr"}], ",", "\[IndentingNewLine]", 
     RowBox[{"ZcEP2", "==", "ZcEPexpr"}], ",", "\[IndentingNewLine]", 
     RowBox[{"cp1", "==", " ", "pp1"}], ",", "\[IndentingNewLine]", 
     RowBox[{"cp2", "==", "pp2"}]}], "\[IndentingNewLine]", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.53539636325*^9, 3.535396368984375*^9}, {
  3.5354583473183937`*^9, 3.535458378895912*^9}, {3.5684506573191724`*^9, 
  3.5684506618966303`*^9}, {3.5720183767608385`*^9, 3.572018410382762*^9}, {
  3.5721675541256704`*^9, 3.572167557997058*^9}, {3.5721676201532726`*^9, 
  3.572167644859743*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"h", "=", "mTimestep"}], ";"}]], "Input",
 CellChangeTimes->{{3.5684549457303896`*^9, 3.5684549483496513`*^9}}],

Cell[BoxData[
 RowBox[{" ", 
  RowBox[{
   RowBox[{"localExpressions", " ", "=", 
    RowBox[{"{", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"pav", "==", 
       RowBox[{
        RowBox[{
         RowBox[{"onPositive", " ", "[", 
          RowBox[{"pp1", "+", "pp2", "-", "pmin"}], "]"}], 
         FractionBox[
          RowBox[{"(", 
           RowBox[{"pp1", "+", "pp2", "-", "pmin"}], ")"}], "2"]}], " ", "+", 
        FractionBox["pmin", "2"]}]}], ",", "\[IndentingNewLine]", 
      RowBox[{"Tav", "==", "Texpr"}], ",", "\[IndentingNewLine]", 
      RowBox[{"ZcEP", "==", "ZcEPexpr"}], ",", "\[IndentingNewLine]", 
      RowBox[{"cdp1", "==", "cdp1expr"}], ",", "\[IndentingNewLine]", 
      RowBox[{"cdp2", "==", "cdp2expr"}]}], "\[IndentingNewLine]", "}"}]}], 
   ";"}]}]], "Input",
 CellChangeTimes->{{3.535389245*^9, 3.535389310125*^9}, {3.535458381317741*^9,
    3.5354583919581614`*^9}, {3.568450649202361*^9, 3.5684506543918796`*^9}, 
   3.568451420013839*^9, {3.5720184181732073`*^9, 3.5720184486629515`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"expressions", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"Tp1", "==", "Tav"}], ",", "\[IndentingNewLine]", 
     RowBox[{"Tp2", "==", "Tav"}], ",", "\[IndentingNewLine]", 
     RowBox[{"cp1", "==", "cp1expr"}], ",", "\[IndentingNewLine]", 
     RowBox[{"cp2", "==", "cp2expr"}], ",", "\[IndentingNewLine]", 
     RowBox[{"Zcp1", "==", "ZcEP"}], ",", "\[IndentingNewLine]", 
     RowBox[{"Zcp2", "==", "ZcEP"}]}], "\[IndentingNewLine]", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.535396355265625*^9, 3.5353963564375*^9}, {
   3.535458354990122*^9, 3.5354583554901123`*^9}, {3.5354583952080994`*^9, 
   3.535458407817232*^9}, 3.5354584912374372`*^9, {3.568450434646907*^9, 
   3.56845044037348*^9}, {3.5720184529101944`*^9, 3.5720184746224365`*^9}}],

Cell[BoxData[
 RowBox[{"Compgen", "[", "file", "]"}]], "Input"]
}, Open  ]]
}, Open  ]]
}, Open  ]]
},
WindowSize->{707, 817},
WindowMargins->{{Automatic, 160}, {3, Automatic}},
FrontEndVersion->"8.0 for Microsoft Windows (64-bit) (October 6, 2011)",
StyleDefinitions->"Default.nb"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[CellGroupData[{
Cell[579, 22, 124, 2, 71, "Section"],
Cell[706, 26, 1008, 25, 192, "Input"],
Cell[1717, 53, 114, 2, 31, "Input"],
Cell[1834, 57, 418, 10, 31, "Input"],
Cell[2255, 69, 1502, 36, 192, "Input"],
Cell[3760, 107, 917, 19, 72, "Input"],
Cell[4680, 128, 860, 17, 72, "Input"],
Cell[5543, 147, 142, 5, 47, "Text"],
Cell[CellGroupData[{
Cell[5710, 156, 46, 0, 36, "Subsection"],
Cell[CellGroupData[{
Cell[5781, 160, 44, 0, 27, "Subsubsection"],
Cell[5828, 162, 1069, 38, 92, "Input"],
Cell[6900, 202, 410, 16, 172, "Input"],
Cell[7313, 220, 844, 32, 132, "Input"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[8206, 258, 31, 0, 36, "Subsection"],
Cell[8240, 260, 218, 6, 47, "Input"],
Cell[8461, 268, 195, 5, 31, "Input"],
Cell[8659, 275, 176, 5, 31, "Input"],
Cell[8838, 282, 199, 7, 23, "DisplayFormula"],
Cell[CellGroupData[{
Cell[9062, 293, 69, 1, 31, "Input"],
Cell[9134, 296, 1348, 19, 30, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[10519, 320, 303, 9, 49, "Input"],
Cell[10825, 331, 1680, 28, 49, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[12542, 364, 311, 10, 31, "Input"],
Cell[12856, 376, 1611, 25, 47, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[14504, 406, 194, 5, 31, "Input"],
Cell[14701, 413, 1623, 26, 30, "Output"]
}, Open  ]],
Cell[16339, 442, 214, 6, 52, "Input"],
Cell[CellGroupData[{
Cell[16578, 452, 144, 3, 31, "Input"],
Cell[16725, 457, 1610, 25, 30, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[18372, 487, 30, 0, 31, "Input"],
Cell[18405, 489, 1534, 22, 30, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[19976, 516, 185, 6, 31, "Input"],
Cell[20164, 524, 1573, 24, 30, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[21774, 553, 120, 3, 31, "Input"],
Cell[21897, 558, 1576, 24, 49, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[23510, 587, 145, 3, 31, "Input"],
Cell[23658, 592, 1406, 21, 30, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[25101, 618, 405, 13, 31, "Input"],
Cell[25509, 633, 1646, 27, 49, "Output"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[27204, 666, 42, 0, 36, "Subsection"],
Cell[27249, 668, 66, 2, 31, "Input"],
Cell[27318, 672, 39, 0, 29, "Text"],
Cell[CellGroupData[{
Cell[27382, 676, 91, 2, 31, "Input"],
Cell[27476, 680, 1834, 32, 47, "Output"]
}, Open  ]],
Cell[29325, 715, 46, 0, 29, "Text"],
Cell[CellGroupData[{
Cell[29396, 719, 94, 2, 31, "Input"],
Cell[29493, 723, 1913, 35, 47, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[31443, 763, 369, 10, 31, "Input"],
Cell[31815, 775, 2165, 43, 49, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[34017, 823, 262, 8, 31, "Input"],
Cell[34282, 833, 1614, 26, 49, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[35933, 864, 258, 8, 31, "Input"],
Cell[36194, 874, 1644, 26, 49, "Output"]
}, Open  ]],
Cell[37853, 903, 47, 0, 29, "Text"],
Cell[37903, 905, 80, 2, 31, "Input"],
Cell[CellGroupData[{
Cell[38008, 911, 30, 0, 31, "Input"],
Cell[38041, 913, 1259, 18, 30, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[39337, 936, 330, 9, 31, "Input"],
Cell[39670, 947, 2185, 44, 49, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[41892, 996, 262, 8, 31, "Input"],
Cell[42157, 1006, 1611, 26, 49, "Output"]
}, Open  ]],
Cell[43783, 1035, 140, 3, 29, "Text"],
Cell[43926, 1040, 61, 0, 29, "Text"],
Cell[CellGroupData[{
Cell[44012, 1044, 88, 2, 31, "Input"],
Cell[44103, 1048, 1579, 25, 47, "Output"]
}, Open  ]],
Cell[45697, 1076, 446, 9, 48, "Text"],
Cell[46146, 1087, 47, 0, 29, "Text"],
Cell[46196, 1089, 115, 2, 31, "Input"],
Cell[46314, 1093, 545, 11, 47, "Input"],
Cell[46862, 1106, 223, 5, 31, "Input"],
Cell[47088, 1113, 144, 4, 52, "Input"],
Cell[47235, 1119, 52, 0, 29, "Text"],
Cell[CellGroupData[{
Cell[47312, 1123, 203, 6, 31, "Input"],
Cell[47518, 1131, 1566, 24, 48, "Output"]
}, Open  ]],
Cell[49099, 1158, 70, 0, 29, "Text"],
Cell[49172, 1160, 122, 4, 47, "Text"],
Cell[49297, 1166, 74, 2, 47, "Output"],
Cell[CellGroupData[{
Cell[49396, 1172, 115, 3, 49, "Input"],
Cell[49514, 1177, 1627, 26, 49, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[51178, 1208, 92, 1, 31, "Input"],
Cell[51273, 1211, 1341, 22, 47, "Output"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[52663, 1239, 37, 0, 36, "Subsection"],
Cell[CellGroupData[{
Cell[52725, 1243, 110, 3, 31, "Input"],
Cell[52838, 1248, 1507, 23, 30, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[54382, 1276, 208, 4, 31, "Input"],
Cell[54593, 1282, 1539, 23, 30, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[56169, 1310, 183, 4, 31, "Input"],
Cell[56355, 1316, 1520, 23, 30, "Output"]
}, Open  ]],
Cell[57890, 1342, 48, 1, 31, "Input"],
Cell[CellGroupData[{
Cell[57963, 1347, 219, 7, 52, "Input"],
Cell[58185, 1356, 1615, 27, 30, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[59837, 1388, 111, 3, 31, "Input"],
Cell[59951, 1393, 2007, 40, 47, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[61995, 1438, 315, 11, 47, "Input"],
Cell[62313, 1451, 1728, 31, 47, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[64078, 1487, 249, 8, 31, "Input"],
Cell[64330, 1497, 2011, 40, 47, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[66378, 1542, 53, 0, 27, "Subsubsection"],
Cell[66434, 1544, 538, 16, 52, "Input"],
Cell[CellGroupData[{
Cell[66997, 1564, 600, 18, 83, "Input",
 CellGroupingRules->{GroupTogetherGrouping, 10000.}],
Cell[67600, 1584, 196, 4, 31, "Input",
 CellGroupingRules->{GroupTogetherGrouping, 10000.}]
}, Closed]],
Cell[67811, 1591, 932, 26, 156, "Input"],
Cell[68746, 1619, 1195, 28, 222, "Input"],
Cell[69944, 1649, 145, 3, 31, "Input"],
Cell[70092, 1654, 1032, 22, 181, "Input"],
Cell[71127, 1678, 819, 15, 172, "Input"],
Cell[71949, 1695, 63, 1, 31, "Input"]
}, Open  ]]
}, Open  ]]
}, Open  ]]
}
]
*)

(* End of internal cache information *)
